package com.strato.osgi.scanner.v1_0_0.activator;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

import com.strato.osgi.scanner.v1_0_0.FrameworkBundleMonitor;
import com.strato.osgi.scanner.v1_0_0.impl.DefaultFrameworkBundleMonitor;

public class Activator implements BundleActivator{
	
	
	public void start(BundleContext context) throws Exception {
		DefaultFrameworkBundleMonitor monitor = new DefaultFrameworkBundleMonitor();
		context.registerService(FrameworkBundleMonitor.class,monitor, null);
		monitor.initialScan(context);
		context.addBundleListener(monitor);
		System.out.println("Strato start up successfully!");
	}
	
	public void stop(BundleContext context) throws Exception {
	}
	
}
